\hypertarget{format__col_8c}{}\doxysubsection{extern/libembroidery/src/formats/format\+\_\+col.c File Reference}
\label{format__col_8c}\index{extern/libembroidery/src/formats/format\_col.c@{extern/libembroidery/src/formats/format\_col.c}}
{\ttfamily \#include $<$stdio.\+h$>$}\newline
{\ttfamily \#include $<$stdlib.\+h$>$}\newline
{\ttfamily \#include $<$string.\+h$>$}\newline
{\ttfamily \#include $<$math.\+h$>$}\newline
{\ttfamily \#include \char`\"{}../embroidery\+\_\+internal.\+h\char`\"{}}\newline
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
char \mbox{\hyperlink{format__col_8c_ae816f75c7dff738a16368f1d8a6c15f3}{read\+Col}} (\mbox{\hyperlink{embroidery_8h_a168c2ed6c7e17dd1aa7755aabc1db314}{Emb\+Pattern}} $\ast$pattern, FILE $\ast$file)
\item 
char \mbox{\hyperlink{format__col_8c_ada015df275bd9197080a7c5eb2a776f4}{write\+Col}} (\mbox{\hyperlink{embroidery_8h_a168c2ed6c7e17dd1aa7755aabc1db314}{Emb\+Pattern}} $\ast$pattern, FILE $\ast$file)
\end{DoxyCompactItemize}


\doxysubsubsection{Detailed Description}
The Embroidery Thread Color Format (.col) \index{col@{col}}

An external color file format for formats that do not record their own colors.

It is a human-\/readable format that has a header that is a single line containing only the number of threads in decimal followed by the windows line break \`{}\textbackslash{}textbackslash\{\}r\textbackslash{}textbackslash\{\}n\}.

Then the rest of the file is a comma seperated value list of all threads with 4 values per line\+: the index of the thread then the red, green and blue channels of the color in that order.\hypertarget{format__col_8c_col-example}{}\doxysubparagraph{Example}\label{format__col_8c_col-example}
If we had a pattern called \char`\"{}example\char`\"{} with four colors\+: black, red, magenta and cyan in that order then the file is (with the white space written out)\+:

example.\+col

4\textbackslash{}r~\newline
 0,0,0,0\textbackslash{}r~\newline
 1,255,0,0\textbackslash{}r~\newline
 2,0,255,0\textbackslash{}r~\newline
 3,0,0,255\textbackslash{}r~\newline


\doxysubsubsection{Function Documentation}
\mbox{\Hypertarget{format__col_8c_ae816f75c7dff738a16368f1d8a6c15f3}\label{format__col_8c_ae816f75c7dff738a16368f1d8a6c15f3}} 
\index{format\_col.c@{format\_col.c}!readCol@{readCol}}
\index{readCol@{readCol}!format\_col.c@{format\_col.c}}
\doxyparagraph{\texorpdfstring{readCol()}{readCol()}}
{\footnotesize\ttfamily char read\+Col (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{embroidery_8h_a168c2ed6c7e17dd1aa7755aabc1db314}{Emb\+Pattern}} $\ast$}]{pattern,  }\item[{FILE $\ast$}]{file }\end{DoxyParamCaption})}

\mbox{\Hypertarget{format__col_8c_ada015df275bd9197080a7c5eb2a776f4}\label{format__col_8c_ada015df275bd9197080a7c5eb2a776f4}} 
\index{format\_col.c@{format\_col.c}!writeCol@{writeCol}}
\index{writeCol@{writeCol}!format\_col.c@{format\_col.c}}
\doxyparagraph{\texorpdfstring{writeCol()}{writeCol()}}
{\footnotesize\ttfamily char write\+Col (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{embroidery_8h_a168c2ed6c7e17dd1aa7755aabc1db314}{Emb\+Pattern}} $\ast$}]{pattern,  }\item[{FILE $\ast$}]{file }\end{DoxyParamCaption})}

